﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 代码生成字段配置表
/// </summary>
public partial class SysCodeGenConfig : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [DisplayName("创建时间")]
    [JsonPropertyName("createdTime")]
    public System.DateTimeOffset? CreatedTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [DisplayName("更新时间")]
    [JsonPropertyName("updatedTime")]
    public System.DateTimeOffset? UpdatedTime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    [DisplayName("创建者Id")]
    [JsonPropertyName("createdUserId")]
    public long? CreatedUserId { get; set; }

    /// <summary>
    /// 创建者名称
    /// </summary>
    [DisplayName("创建者名称")]
    [JsonPropertyName("createdUserName")]
    [StringLength(20)]
    public string? CreatedUserName { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    [DisplayName("修改者Id")]
    [JsonPropertyName("updatedUserId")]
    public long? UpdatedUserId { get; set; }

    /// <summary>
    /// 修改者名称
    /// </summary>
    [DisplayName("修改者名称")]
    [JsonPropertyName("updatedUserName")]
    [StringLength(20)]
    public string? UpdatedUserName { get; set; }

    /// <summary>
    /// 代码生成主表ID
    /// </summary>
    [DisplayName("代码生成主表ID")]
    [JsonPropertyName("codeGenId")]
    public long CodeGenId { get; set; }

    /// <summary>
    /// 数据库字段名
    /// </summary>
    [DisplayName("数据库字段名")]
    [JsonPropertyName("columnName")]
    [Required(ErrorMessage = "数据库字段名不能为空")]
    [StringLength(100)]
    public string? ColumnName { get; set; }

    /// <summary>
    /// 字段描述
    /// </summary>
    [DisplayName("字段描述")]
    [JsonPropertyName("columnComment")]
    [StringLength(100)]
    public string? ColumnComment { get; set; }

    /// <summary>
    /// .NET数据类型
    /// </summary>
    [DisplayName(".NET数据类型")]
    [JsonPropertyName("netType")]
    [StringLength(50)]
    public string? NetType { get; set; }

    /// <summary>
    /// 作用类型（字典）
    /// </summary>
    [DisplayName("作用类型（字典）")]
    [JsonPropertyName("effectType")]
    [StringLength(50)]
    public string? EffectType { get; set; }

    /// <summary>
    /// 外键实体名称
    /// </summary>
    [DisplayName("外键实体名称")]
    [JsonPropertyName("fkEntityName")]
    [StringLength(50)]
    public string? FkEntityName { get; set; }

    /// <summary>
    /// 外键显示字段
    /// </summary>
    [DisplayName("外键显示字段")]
    [JsonPropertyName("fkColumnName")]
    [StringLength(50)]
    public string? FkColumnName { get; set; }

    /// <summary>
    /// 外键显示字段.NET类型
    /// </summary>
    [DisplayName("外键显示字段.NET类型")]
    [JsonPropertyName("fkColumnNetType")]
    [StringLength(50)]
    public string? FkColumnNetType { get; set; }

    /// <summary>
    /// 字典code
    /// </summary>
    [DisplayName("字典code")]
    [JsonPropertyName("dictTypeCode")]
    [StringLength(50)]
    public string? DictTypeCode { get; set; }

    /// <summary>
    /// 列表是否缩进（字典）
    /// </summary>
    [DisplayName("列表是否缩进（字典）")]
    [JsonPropertyName("whetherRetract")]
    [StringLength(5)]
    public string? WhetherRetract { get; set; }

    /// <summary>
    /// 是否必填（字典）
    /// </summary>
    [DisplayName("是否必填（字典）")]
    [JsonPropertyName("whetherRequired")]
    [StringLength(5)]
    public string? WhetherRequired { get; set; }

    /// <summary>
    /// 是否是查询条件
    /// </summary>
    [DisplayName("是否是查询条件")]
    [JsonPropertyName("queryWhether")]
    [StringLength(5)]
    public string? QueryWhether { get; set; }

    /// <summary>
    /// 查询方式
    /// </summary>
    [DisplayName("查询方式")]
    [JsonPropertyName("queryType")]
    [StringLength(10)]
    public string? QueryType { get; set; }

    /// <summary>
    /// 列表显示
    /// </summary>
    [DisplayName("列表显示")]
    [JsonPropertyName("whetherTable")]
    [StringLength(5)]
    public string? WhetherTable { get; set; }

    /// <summary>
    /// 列表是否排序
    /// </summary>
    [DisplayName("列表是否排序")]
    [JsonPropertyName("whetherOrderBy")]
    [StringLength(5)]
    public string? WhetherOrderBy { get; set; }

    /// <summary>
    /// 增改
    /// </summary>
    [DisplayName("增改")]
    [JsonPropertyName("whetherAddUpdate")]
    [StringLength(5)]
    public string? WhetherAddUpdate { get; set; }

    /// <summary>
    /// 主键
    /// </summary>
    [DisplayName("主键")]
    [JsonPropertyName("columnKey")]
    [StringLength(5)]
    public string? ColumnKey { get; set; }

    /// <summary>
    /// 数据库中类型（物理类型）
    /// </summary>
    [DisplayName("数据库中类型（物理类型）")]
    [JsonPropertyName("dataType")]
    [StringLength(128)]
    public string? DataType { get; set; }

    /// <summary>
    /// 是否通用字段
    /// </summary>
    [DisplayName("是否通用字段")]
    [JsonPropertyName("whetherCommon")]
    [StringLength(5)]
    public string? WhetherCommon { get; set; }

}
